<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title><?php echo $title;?></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../public/plugin/layui/css/layui.css" media="all">
  
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header" style="padding-top:30px;"><?php echo $title;?></div>
          <div class="layui-card-body" pad15>
            <form method="post" action="edit_multiple_deal.php">
            <div class="layui-form">
			
				<div class="layui-form-item">
				<label class="layui-form-label">题目类型</label>
				<div class="layui-input-block">
				
					<select name="type" required>
					<!-- 题型使用$list[0][id];代表题型第0个，题型id为几，$list[0][type_name];代表题型第0个，类型名C语言。如果题型id=题目中的type_id，输出类型名 -->
						<option value="<?php $id = $row['type_id']; echo $list[$id-1]['id'];?>"><?php $id = $row['type_id']; if( $id == $list[$id-1]['id']); echo $list[$id-1]['type_name'];?></option>
						<?php foreach($list as $k => $v):?>
							<option value="<?php echo $v['id'];?>"><?php echo $v['type_name'];?></option>
						<?php endforeach;?>
				
					</select>
				
				</div>
			  </div>

              <div class="layui-form-item">
				<label class="layui-form-label">题目</label>
				<div class="layui-input-block">
				  <input type="text" name="question" placeholder="请输入题目" value="<?php echo $row['question'];?>" required class="layui-input">
				</div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">选项A</label>
                <div class="layui-input-inline">
                  <input type="text" name="A" value="<?php echo $row['A'];?>" placeholder="请输入选项" required class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">选项B</label>
                <div class="layui-input-inline">
                  <input type="text" name="B" value="<?php echo $row['B'];?>" placeholder="请输入选项" required class="layui-input">
                </div>
              </div>
			  <div class="layui-form-item">
                <label class="layui-form-label">选项C</label>
                <div class="layui-input-inline">
                  <input type="text" name="C" value="<?php echo $row['C'];?>"  placeholder="请输入选项" required class="layui-input">
                </div>
              </div>
			  <div class="layui-form-item">
                <label class="layui-form-label">选项D</label>
                <div class="layui-input-inline">
                  <input type="text" name="D" value="<?php echo $row['D'];?>"  placeholder="请输入选项" required class="layui-input">
                </div>
              </div>
			  <div class="layui-form-item">
                <label class="layui-form-label">答案</label>
                <div class="layui-input-inline">
                  <input type="text" name="answer" value="<?php echo $row['answer'];?>" placeholder="请输入选项" required class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <button class="layui-btn">修改</button>
                </div>
              </div>
            </div>
			<input type="hidden" name="id" value="<?php echo $_GET['id'];?>" /> 
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
<script src="../../public/js/jquery.js"></script>
<script src="../../public/plugin/layui/layui.js"></script>
<script>
	layui.use('form', function(){
		var form = layui.form;
	});
	/**清空表单***/
	$(function(){
		$("#reset").on('click',function(){
			$("input[type='text']").val("");
			$("input:first").focus();
		});
	});
</script>
</body>
</html>